Accord Software, Inc.

tutorial02/main.c




/*
 * Accord Software, Inc.
 *
 * Tutorial 02
 *
 * More adding, this time with pointers.
 * csgen handles arbitrary pointer chasing 
 * automatically. There is no hard limit 
 * to levels of indirectness.
 */

extern int *addbyptrs();

main()
{
	int v;
	int *w = &v;
	int **x = &w;
	int ***y = &x;
	int ****z = &y;
	int *sum;

	v = 7;
	sum = addbyptrs(v, w, x, y, z);
	printf("addbyptrs returned %d\n", *sum);

	exit(0);
}

[ Home | Tutorials | ptrs.c | ptrs.h ]
E-Mail:webmaster@accord.com
[P-023] Updated March 14, 1996
Copyright © 1993-1996 Accord Software, Inc. All rights reserved.